﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace nameero.util
{
    class MultiMove
    {
        LinkedList<Point> movePoints;

        public MultiMove()
        {
            this.movePoints = new LinkedList<Point>();
        }

        public MultiMove(LinkedList<Point> mMoves)
        {
            this.movePoints = new LinkedList<Point>();
            foreach (Point p in mMoves)
                this.movePoints.AddLast(p);
        }

        public void AddMovePoint(Point p)
        {
            movePoints.AddLast(p);
            //Console.WriteLine("dodana " + p.ToString());
        }

        public LinkedList<Point> GetMovePoints()
        {
            return movePoints;
        }

        public String ToString()
        {
            String s = "";
            for (int i = 0; i < movePoints.Count; ++i)
            {
                s += movePoints.ElementAt(i);
                if (i != movePoints.Count - 1)
                {
                    s += " --> ";
                }
            }

            return s;
        }
    }
}
